<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>任务二：零基础JavaScript编码（二）</title>

	<style type="text/css">
		* {
			padding: 0;
			margin: 0;
			box-sizing: border-box;
		}
		.content {
			width: 400px;
			height: 200px;
			margin: 100px auto;
		}
	</style>
</head>
<body>
<div class="content">
	<h3>污染城市列表</h3>
	<ul id="aqi-list">
		
	</ul>
</div>
<script type="text/javascript">
	var aqiData = [
	  ["北京", 90],
	  ["上海", 50],
	  ["福州", 10],
	  ["广州", 50],
	  ["成都", 90],
	  ["西安", 100]
	];
	(function(){
		var weather = document.getElementById("aqi-list");
		for(var i=0;i<aqiData.length;i++){
			if(aqiData[i][1]>60){
				var node = document.createElement("li");
				var para = document.createTextNode(aqiData[i][0]+","+aqiData[i][1]);
				node.appendChild(para);
				weather.appendChild(node);
			}
			
		}
	})();
</script>
</body>
</html>
+